/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 *
 * @format
 * @flow
 */
import {NavigationActions} from 'react-navigation';
import React,{Component} from 'react';
import { createBottomTabNavigator } from "react-navigation-tabs";
import {
  SafeAreaView,
  StyleSheet,
  ScrollView,
  View,
  Text,
  StatusBar,
    BackHandler
} from 'react-native';

import {
  Header,
  LearnMoreLinks,
  Colors,
  DebugInstructions,
  ReloadInstructions,
} from 'react-native/Libraries/NewAppScreen';
import FavoritePage from './FavoritePage';
import TrendingPage from './TrendingPage';
import PopularPage from './PopularPage';
import MyPage from './MyPage';
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
import Ionicons from 'react-native-vector-icons/Ionicons';
import Entypo from 'react-native-vector-icons/Entypo';
import NavigationUtil from '../navigator/NavigationUtil';
import DynamicTabNavigator from '../navigator/DynamicTabNavigator';
type Props = {};
export default class HomePage extends Component<Props>{
    componentDidMount() {
        BackHandler.addEventListener("hardwareBackPress",this.onBackPress);
    }
    componentWillUnmount() {
        BackHandler.removeEventListener("hardwareBackPress",this.onBackPress);
    }
    onBackPress = () => {

    }
    render(){
      NavigationUtil.navigation = this.props.navigation;
        // const Tab = createAppContainer(this._tabNavigator());
    return (<DynamicTabNavigator/>);
  }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: '#F5FCFF',
    },
    welcome: {
        fontSize: 20,
        textAlign: 'center',
        margin: 10,
    },
});

// export default App;
